<template>
  <el-dialog v-drag width="40%" :title="title + '审核'" :close-on-click-modal="false"  :visible.sync="visible">
    <el-input size="mini" type="textarea" v-model="auditOptions" placeholder="审核意见" clearable></el-input>

  <span slot="footer" class="dialog-footer">
    <el-button size="mini" @click="visible = false">取消</el-button>
    <el-button size="mini" type="primary" @click="agree()">审核同意</el-button>
    <el-button size="mini" type="danger" @click="disagree()">审核不同意</el-button>
  </span>
  </el-dialog>
</template>

<script>
  export default {
    data() {
      return {
        visible: false,
        auditOptions: '同意',
        title:''
      }
    },
    methods: {
      init(title) {
        this.title = title
        this.visible = true
      },
      agree(){
        this.$parent.audit({"auditOptions": this.auditOptions, "auditStatus": 1, "title": this.title});
      },
      disagree(){
        this.$parent.audit({"auditOptions": this.auditOptions, "auditStatus": 0, "title": this.title});
      }
    }
  }
</script>
<style lang="less" scoped>
  .filter-tree {
    background-color: white;
  }

  .el-col:nth-child(2) {
    padding-left: 20px;
  }

  .el-select {
    max-width: 100px;
  }

  .el-input {
    margin: 0px;
  }
</style>
